package com.gzhu.knowledgeAdmin.entity;


import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.gzhu.knowledgeAdmin.common.valid.AddGroup;
import com.gzhu.knowledgeAdmin.common.valid.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.*;
/**
 * 规则表
 * 
 * @author yangminggui
 * @email giaogiao@gmail.com
 * @date 2024-01-25 23:06:27
 */
@Data
@TableName("rule")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="rule对象", description="规则表")
public class Rule implements Serializable {
	private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.AUTO)
	@NotNull(message = "修改必须指定自增id",groups = {UpdateGroup.class})
	@Null(message = "新增不能指定自增id",groups = {AddGroup.class})
	@ApiModelProperty(value = "自增id")
	private Integer id;

	@NotBlank(groups = {AddGroup.class})
    @TableField(value = "content")
	@ApiModelProperty(value = "条件间的逻辑关系")
	private String content;

	@NotNull(groups = {AddGroup.class})
    @TableField(value = "scene_id")
	@ApiModelProperty(value = "场景id")
	private Integer sceneId;

	@NotBlank(groups = {AddGroup.class})
    @TableField(value = "name")
	@ApiModelProperty(value = "规则名称")
	private String name;

    @TableField(value = "gsid")
	@ApiModelProperty(value = "公司id")
	private String gsid;

    @TableField(value = "bz")
	@ApiModelProperty(value = "备注")
	private String bz;

	@TableField(value = "is_deleted")
	@TableLogic
	@ApiModelProperty(value = "逻辑删除 1（true）已删除， 0（false）未删除")
	private Integer isDeleted;

	@TableField(fill = FieldFill.INSERT, value = "gmt_create")
	@ApiModelProperty(value = "创建时间")
	private Date gmtCreate;

	@TableField(fill = FieldFill.UPDATE,value = "gmt_modified")
	@ApiModelProperty(value = "修改时间")
	private Date gmtModified;

	@TableField(exist = false)
	private String scene;


}
